<div class="wrap shopp">

	<div class="icon32"></div>
	<h2><?php _e('Site Subscriptions','Shopp'); ?></h2>

	<ul class="subsubsub">
		<?php
			$start = 0;
			
			foreach ($menu as $item)
			{
				// Format using the pipe separator
				$pipe = ($start === 0) ? '' : '|';
				$start++;
				
				// Label and link
				$label = $item[0];
				$link = ShoppSE_Settings::setting_link($item[1]);
				
				// Current item?
				$subpage = array_key_exists('subpage', $_GET) ? $_GET['subpage'] : '';
				$current = ''; // Assume not
				
				if ($subpage == $item[1] or (empty($subpage) and $start == 1))
					$current = 'class="current"';
				
				// Print
				echo '<li> '.$pipe.' <a href="'.$link.'" '.$current.'>';
				echo $label.'</a></li>';
			}
		?>
	</ul>
	
	<div id="subpagecontent">
	<?php
		// Ensure that we have a page to display
		if (!isset($page))
		{
			echo '<h4>Unexpected error</h4>';
			echo '<p>The requested administrative page is unavailable.</p>';
		}
		else echo $page;
	?>
	</div>
	
</div>

<?php $assetpath = ShoppSE::$object->plugin_url; ?>
<script type="text/javascript">var shoppsub_assetpath = "<?php echo $assetpath ?>";</script>
<script type="text/javascript" src="<?php echo $assetpath; ?>/inc/js/standard.js"></script>